import request from '@/utils/request'

export function getProjectList(data) {
  return request({
    url: 'project/list',
    method: 'post',
    params: { ...data }
  })
}

export function getProject(id) {
  return request({
    url: 'project/get',
    method: 'post',
    params: { id }
  })
}

export function addProject(data) {
  return request({
    url: 'project/add',
    method: 'post',
    data
  })
}

export function editProject(data) {
  return request({
    url: 'project/edit',
    method: 'post',
    data
  })
}

export function settleProject(id) {
  return request({
    url: 'project/settle',
    method: 'post',
    params: { id }
  })
}

export function editProjectStatus(id, status) {
  return request({
    url: 'project/edit_status',
    method: 'post',
    params: { id, status }
  })
}

export async function getProjectStatus() {
  return request({
    url: 'project/status',
    method: 'get'
  })
}
